package com.example.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

// 使用@ResponseStatus给异常类加上状态码，当控制器抛出该异常的时候，HTTP状态码就会自动设置为这里指定的状态码
@ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "User Not Found")
public class UserNotFoundException extends RuntimeException {
}
